using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;

namespace XnaGameComponents
{
    public class Helper
    {
        internal static Matrix CreateBase(Vector3 v1, Vector3 v2, Vector3 v3)
        {
            Matrix m = new Matrix();
            v1.Normalize();
            v2.Normalize();
            v3.Normalize();
            m.M11 = v1.X;
            m.M12 = v2.X;
            m.M13 = v3.X;
            m.M21 = v1.Y;
            m.M22 = v2.Y;
            m.M23 = v3.Y;
            m.M31 = v1.Z;
            m.M32 = v2.Z;
            m.M33 = v3.Z;
            return m;
        }

        internal static bool IsAtLeft(Vector3 v, Matrix bond)
        {
            return Vector3.Transform(v, bond).X < 0;
        }
        internal static bool IsAtRight(Vector3 v, Matrix bond)
        {
            v = Vector3.Transform(v, bond);
            return v.X > 0;
        }
    }
}
